<template>
        <div class="layout-content">
            <Row>
                <Col span="4">
                    <Menu :active-name="menuItem" width="auto" :open-names="map" theme="dark" @on-select="changeHash">
                        <Submenu name="activity">
                            <template slot="title">
                                <Icon type="ios-navigate"></Icon>
                                活动立项及预算
                            </template>
                            <MenuItem name="/activity/search">查看活动</MenuItem>
                            <MenuItem name="/activity/create">创建活动</MenuItem>
                        </Submenu>
                        <Submenu name="coupon">
                            <template slot="title">
                                <Icon type="ios-keypad"></Icon>
                                优惠券
                            </template>
                            <MenuItem name="/coupon/search">查看优惠券</MenuItem>
                            <MenuItem name="/coupon/create">配置优惠券</MenuItem>
                        </Submenu>
                    </Menu>
                </Col>
                <Col span="20">
                    <router-view></router-view>
                </Col>
            </Row>
        </div>
</template>

<script>
    export default {
        props: {
            menu:String,
            menuItem: String
        },
        data() {
            return {
               map : [this.menu]
            };
        },
        mounted() {
           //alert(this.menu);
        },
        beforeDestroy() {

        },
        methods: {
          changeHash(val,event){
            this.$router.push({path:val})
          }
        }
    };
</script>

<style scoped>

 </style>